package leetcode;

public class OnesAndZeros {

	public int findMaxForm(String[] strs, int m, int n) {
		if(strs == null || strs.length <= 0){
			return 0;
		}
		int length = strs.length;
		
		//dp[i][m][n] 表示前i个字符串m个0和n个1能组成多少个字符串
        int[][][] dp = new int[length][m][n];
        
        //dp[i][m][n] = max(dp[i - 1][m - curM][n - curN] + 1 , dp[i - 1][m][n]); (if m > curM && n > curN)
        //dp[i][m][n] = dp[i - 1][m][n];
        
        int[][] record = new int[length][2];
        for(int k = 0; k < strs.length; k++){
        	int curLength = strs[k].length();
        	int count1 = 0;
        	int count0 = 0;
        	for(int p = 0; p < curLength; p++){
        		if(strs[k].charAt(p) == '0'){
        			count0++;
        		}else{
        			count1++;
        		}
        	}
        	record[k][0] = count0;
        	record[k][1] = count1;
        }
        //大于等于record[0][0]个m并且大于等于record[0][1]为true
        dp[0][record[0][0]][record[0][1]] = 1;
        for(int i = 1; i < length; i++){
        	
        }
        return 0;
    }
}
